package com.lovenote.common.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * User 实体对象
 * @author xingkong1221
 *
 */
@Entity
@Table(name = "common_user")
public class User implements Serializable{

	private static final long serialVersionUID = 3999959284765682486L;

	@Id
	@Column(name = "id", length = 10)
	@GenericGenerator(name = "generator", strategy = "increment")
	@GeneratedValue(generator = "generator")
	private long id;
	
	@Column(name = "username", nullable = false, unique = true, length = 20)
	private String username;
	
	@Column(name = "password", nullable = false, length = 32)
	private String password;
	
	@Column(name = "email", nullable = false, unique = true, length = 50)
	private String email;
	
	@Column(name = "signature", nullable = false, length = 255)
	private String signature;
	
	@Column(name = "avatar", nullable = false, length = 10)
	private long avatar;
	
	@Column(name = "new_pm", nullable = false, length = 5)
	private int newPm;
	
	@Column(name= "dateline", nullable = true)
	private Date dateline;
	

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getSignature() {
		return signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}

	public long getAvatar() {
		return avatar;
	}

	public void setAvatar(long avatar) {
		this.avatar = avatar;
	}

	public int getNewPm() {
		return newPm;
	}

	public void setNewPm(int newPm) {
		this.newPm = newPm;
	}

	public Date getDateline() {
		return dateline;
	}

	public void setDateline(Date dateline) {
		this.dateline = dateline;
	}
	
}
